QuickTime 2.5 introduced three functions for working with compressed fields of video data. The ImageFieldSequenceBegin function initiates an image field sequence operation; the ImageFieldSequenceExtractCombine function performs the desired operations; and the ImageFieldSequenceEnd function terminates the operation.
Initiates an image field sequence operation and specifies the input and output data format.
pascal OSErr ImageFieldSequenceBegin (
ImageFieldSequence *ifs,
ImageDescriptionHandle desc1,
ImageDescriptionHandle desc2,
ImageDescriptionHandle descOut);
Performs field operations on video data.
pascal OSErr ImageFieldSequenceExtractCombine (
ImageFieldSequence ifs,
long fieldFlags,
void *data1,
long dataSize1,
void *data2,
long dataSize2,
void *outputData,
long *outDataSize);
This function was introduced in QuickTime 2.5 and provides a method for working directly with fields of interlaced video. You can use the ImageFieldSequenceExtractCombine function to change the field dominance of an image by reversing the two fields, or to create or remove the effects of the 3:2 pulldown commonly performed when transferring film to NTSC videotape.
Because this function operates directly on the compressed video data, it is faster than working with decompressed images. It also has the added benefit of eliminating any image quality degradation that might result from lossy codecs.
The ImageFieldSequenceExtractCombine function accepts one or two compressed images as input and creates a single compressed image on output. You specify the operation to be performed using the fieldFlags parameter. The function returns the codecUnimpErr result code if there is no codec present in the system that can perform the requested operation.
The Apple Component Video (YUV) and Motion JPEG codecs currently support this function. See Chapter 4, "Image Compressor Components," for information on incorporating support for this function in your codec.
Ends an image field sequence operation.
pascal OSErr ImageFieldSequenceEnd (ImageFieldSequence ifs);
| Previous | Chapter Contents | Chapter Top | Next |